﻿@model DeviceDefectManager_WCG.Models.Defect

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>Defect</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            @Html.LabelFor(model => model.DeviceID, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("DeviceID", null, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.DeviceID, "", new { @class = "text-danger" })
            </div>
        </div>
        <div class="form-group ">
            @Html.LabelFor(model => model.DefectType, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.RadioButton("DefectType", 1, false, new { @class = "radio-inline" }) 紧急
                @Html.RadioButton("DefectType", 2, false, new { @class = "radio-inline" }) 重要
                @Html.RadioButton("DefectType", 3, true, new { @class = "radio-inline" }) 一般
                @Html.ValidationMessageFor(model => model.DefectType, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Content, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
            </div>
        </div>



        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
